Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e: Replace logr.Logger with zap.SugaredLogger #1684

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

nirs
Copy link
Member

@nirs nirs commented Nov 29, 2024

We use zap from controller runtime, returning logr.Logger. Replace it
with zap SugaredLoger which is much nicer to use, supporting both
structured and formatted logging and named log levels.

We use the default development configuration which require no special
setup.

All the logs using string concatenation or fmt.Sprintf() replace with
log.Infof() and log.Errof() and use %q format for more clear logs.

Part of #1686

@nirs nirs force-pushed the e2e-zap-logger branch 2 times, most recently from d8e86db to 51e2686 Compare December 1, 2024 11:57
@nirs nirs force-pushed the e2e-zap-logger branch 2 times, most recently from f9c1b4c to d57cfae Compare December 4, 2024 15:05
We used zap from controller runtime, returning logr.Logger. Replace it
with zap SugaredLoger which is much nicer to use, supporting both
structured and formatted logging and named log levels.

We use the default development configuration which require no special
setup.

Replace the logs using string concatenation or fmt.Sprintf() with
log.Infof() or log.Errorf(), using quoted arguments for more clear logs.

Signed-off-by: Nir Soffer <[email protected]>
@nirs nirs marked this pull request as ready for review December 4, 2024 16:44
@raghavendra-talur raghavendra-talur merged commit b0a83df into RamenDR:main Dec 4, 2024
22 of 23 checks passed
@nirs nirs deleted the e2e-zap-logger branch December 4, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants